
CheckStateForm = Ext.extend(Ext.Window,
{
    constructor : function(a) {
        Ext.applyIf(this, a);
        this.initUIComponents();
        CheckStateForm .superclass.constructor.call(this, {
            layout : "fit",
            id : this.inputFormName,
            items : yearGridFormPanel,
            modal : true,
            bodyStyle : "padding:2px;",
            buttonAlign : "center",
            buttons : yearGridFormButtons,
            title : "检查情况",
            iconCls : "menu-flowWait",
            width : 620,
            height : 450
        });
    },
    //初始化数据
    initUIComponents : function() {
        createyeargridform({
            operation:this,
            form:{
                saveUrl: __ctxPath+"/safecheckplan/saveCheckState.do",
                items:[
                {
                    id : "checkState.id",
                    name : "checkState.id",
                    xtype : "hidden",
                    value : this.id == null ? "": this.id
                }, {
                    name : "checkState.checkId",
                    xtype : "hidden",
                    id : "checkState.checkId",
                    value : this.checkId == null ? "" : this.checkId
                },{
                    name : "checkState.years",
                    xtype : "hidden",
                    id : "checkState.years",
                    value : this.years == null ? "" : this.years
                },{
				layout : "column",
				//      border:false,
				bodyStyle : "padding:5px;",
				items : [
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : '检查部位'
										+ '<font color=red>*</font>',
								id : "checkState.checkPart",
								name : "checkState.checkPart",
								maxLength : 80,
								width : 146,
								allowBlank : false,
								blankText : "检查部位不能为空！"
							} ]
						},
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : '负责人',
								xtype : 'textfield',
								name : "checkState.checkleader",
								width : 146,
								
							} ]
						},
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : "检查状态",
								id : "checkState.state",
								name : "checkState.state",
								xtype : "combo",
								mode : "local",
								editable : false,
								width : 146,
								triggerAction : "all",
								store : [
										[ "1",  "未开始" ],
										[ "2",  "检查中" ],
										[ "3",	"关闭" ] ],
							} ]
						},
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							items : [ {
								xtype : "datefield",
								fieldLabel : '检查时间'
										+ '<font color=red>*</font>',
								id : "checkState.checkStartDate",
								format : "y-m-d",
								name : "checkState.checkStartDate",
								width : 146,
								allowBlank : false,
								blankText : "检查时间不能为空！"
							} ]
						},
						
						{
						layout : "form",
						border : false,
						columnWidth : .5,
						items : [ {
							xtype : "textfield",
							fieldLabel : '检查组成员',
							name : 'checkState.member',
							/*maxLength:300,
							height:25,*/
							width : 146
						} ]
						}]
                }
				]
            },
            loadData:{
                getUrl:__ctxPath +"/safecheckplan/getCheckState.do",
                preName : "checkState"
            },
            isShow : this.isShow
        });
    }
});
